<link href="<?php echo base_url('resources'); ?>/css/user/duan_style.css" rel="stylesheet" type="text/css" />
<script language = "javascript" src='<?php echo base_url(); ?>/ckeditor/ckeditor.js' type="text/javascript"></script>
<link href="<?php echo base_url('resources'); ?>/js/jquery-ui.css" rel="stylesheet" type="text/css" />
<script src="<?php echo base_url('resources/jquery-ui-1.10.3/jquery-1.9.1.js');?>"></script>
<script src="<?php echo base_url('resources/jquery-ui-1.10.3/ui/jquery-ui.js');?>"></script>

<div id="giaonhiemvu">
    <form id="giaonhiemvu-form" action="<?php echo base_url('nhanvien/duan/SaveNhiemVu?id='). $id; ?>" method="post">
        <fieldset>
        	<legend>Giao nhiệm vụ</legend>
                <div>
                <label for="task">Task: <span class="required">*</span></label>
                <input type="text" name="task" id="task" value="" size="20" maxlength="80" tabindex="1" />
            </div>
            <div>
                    <label for="nguoinhan">Người nhận: <span class="required">*</span></label>
                    <select name="nguoinhan" tabindex="2">
                            <?php
                            
                                for ($i=0; $i<sizeof($result); $i++){
                                    echo "<option value='{$result[$i]['MaHoSo']}'";
                                    if (isset($_POST['nguoinhan']) && ($_POST['nguoinhan'] == $result[$i]['MaHoSo'])) echo "selected='selected'";
                                    echo ">" .$result[$i]['HoTen']. "</option>";
                                }
                            
                            ?>
                    </select>
 
            <div>
                <label for="noidung">Nội dung: <span class="required">*</span></label>
                <div><textarea name="noidung" rows="10" cols="50" id="noidung"tabindex="3"></textarea>
                <?php echo display_ckeditor($ckeditor); ?>
                </div>
            </div>
            <div>
                <label for="loaibaocao">Loại báo cáo: <span class="required">*</span></label>
                <div id="loaibaocao">
                    <select name="loaibaocao" tabindex="4">
                        <?php
                                for ($i=0; $i<sizeof($resultLoaiBaoCao); $i++){
                                    echo "<option value='{$resultLoaiBaoCao[$i]['MaLoaiBaoCao']}'";
                                    if (isset($_POST['loaibaocao']) && ($_POST['loaibaocao'] == $resultLoaiBaoCao[$i]['MaLoaiBaoCao'])) echo "selected='selected'";
                                    echo ">" .$resultLoaiBaoCao[$i]['TenLoaiBaoCao']. "</option>";
                                }
                            
                        ?>
                    </select>
                </div>
            </div>
            
            <script>
                $(function() {
                    $( "#ngaykt" ).datepicker({dateFormat: "yy-mm-dd"});
                });
            </script>
            <div>
            <label for="ngaykt">Ngày kết thúc: <span class="required">*</span></label>
                <input type="text" name="ngaykt" id="ngaykt" value="" size="20" maxlength="10" tabindex="5" />
            </div>
        </fieldset>
        <div><input class="submit" type="submit" name="submit" value="   OK   " /></div>
    </form>
</div>